import time
import hashlib

# 示例数据
import time

# 当前时间戳（毫秒）
timestamp_ms = int(time.time() * 1000)

x_ca_timestamp = str(int(time.time() * 1000))  # 当前时间戳（毫秒）
m="1"
x_ca_appid = "123456"  # 随便填
# request_params = f'''{{"mid":"101010","minute":"{m}","method":""}}'''  # 示例请求参数
request_params = '''{"minute":"10","method":""}'''
ak = "09(o5PCgrswUU6BpJpfwukFZXiE@JKe2f"
# 拼接字符串
raw_string = x_ca_timestamp + request_params + x_ca_appid + ak

# 计算 MD5
x_sign = hashlib.md5(raw_string.encode('utf-8')).hexdigest()

# 输出

print("当前时间戳：", x_ca_timestamp)
print("拼接", raw_string)
print("x-sign:", x_sign)
